<%- model_class = @user.class -%>
<div class="page-header">
  <h1><%= @user.name %></h1>
</div>

<div class="span12">
  <div class="row show-grid">
    <div class="span4">
      <h2> Info </h2>
      <table class='table'>
        <tbody>
          <tr>
            <td><strong><%= model_class.human_attribute_name(:name) %></strong></td>
            <td><%= @user.name %>
          </tr>
          <tr>
            <td><strong><%= model_class.human_attribute_name(:hometown) %></strong></td>
            <td><%= @user.hometown %>
          </tr>
        </tbody>
      </table>
    </div>
    <div class= 'span2'>
      <h2>Friends</h2>
      <%= render 'friends_collection',{ :users => @user.friends, :friendship_requests => false } %>
      </table>
    </div>
  </div>

  <div class="row">
    <dic class="span4">
    <%= link_to 'Index',  users_path, :class => 'btn'  %>
    <% if current_user %>
      <%= link_to("Logout", destroy_user_session_path, :method => :delete, :class => 'btn btn-danger') %>
    <% end %>
  </div>
</div>
